package org.webequa.core.maple.quantity;

import org.webequa.core.common.operator.QuantityObjectOperation;
import org.webequa.core.common.quantity.QuantityObject;
import org.webequa.core.common.signature.QuantityObjectSignature;
import org.webequa.core.maple.manager.MapleSupervisor;

import com.maplesoft.externalcall.MapleException;
import com.maplesoft.openmaple.Engine;
import com.maplesoft.openmaple.Name;

public class MapleQuantityObject implements QuantityObject
{	
	public MapleQuantityObject()
	{
		mapleEngine = MapleSupervisor.getMapleEngine();
		mapleVarName = MapleSupervisor.getVarIdName();
		try
		{
			mapleObject = mapleEngine.newName(mapleVarName,true);
		} catch (MapleException e)
		{
			e.printStackTrace();
		}
	}
	
	@Override
	public QuantityObjectOperation getOperation()
	{
		return null;
	}

	@Override
	public QuantityObjectSignature getSignature()
	{
		return signature;
	}
	
	public Engine getMapleEngine()
	{
		return mapleEngine;
	}
	
	public void setMapleObject(Name in)
	{
		mapleObject = in;		
	}
	
	public String getVarName()
	{
		return mapleVarName;
	}
	
	public Name getMapleObject()
	{
		return mapleObject;
	}
	
	protected Engine mapleEngine;
	protected Name mapleObject;
	protected String mapleVarName;	
	protected QuantityObjectSignature signature;	
}
